<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .page{
      width: 100vw;
      height: 100vh;
    }
    #test{
      width: 100px;
      height: 100px;
      position: absolute;
      left: 50px;
      top: 200px;
      background-color: #000;
    }
  </style>
</head>
<body>
  <div class="page">
    <div id="test"></div>
  </div>

  <script>
    let dom = document.getElementById('test')
    console.log(dom.getBoundingClientRect())
  </script>
</body>
</html>